package com.zdsoft.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/***
 * 
 * <p>类描述:线程池属性配置实体类</p>
 * @copyright www.zdsoft.cn
 * @author xingdaolin@msn.cn
 * @date  2016年12月1日
 * @version 1.0
 */
@Configuration
@PropertySource("classpath:conf/thread.properties")
public class ThreadProperty {
	@Value("${task.corePoolSize}")
	private int corePoolSize=2;
	@Value("${task.maxPoolSize}")
	private int maxPoolSize = 10;
	@Value("${task.keepAliveSeconds}")
	private int keep = 10;
	@Value("${task.queueCapacity}")
	private int queue = 200;
	@Value("${task.auto}")
	private boolean auto = false;
	public int getCorePoolSize() {
		return corePoolSize;
	}
	public void setCorePoolSize(int corePoolSize) {
		this.corePoolSize = corePoolSize;
	}
	public int getMaxPoolSize() {
		return maxPoolSize;
	}
	public void setMaxPoolSize(int maxPoolSize) {
		this.maxPoolSize = maxPoolSize;
	}
	public int getKeep() {
		return keep;
	}
	public void setKeep(int keep) {
		this.keep = keep;
	}
	public int getQueue() {
		return queue;
	}
	public void setQueue(int queue) {
		this.queue = queue;
	}
	public boolean isAuto() {
		return auto;
	}
	public void setAuto(boolean auto) {
		this.auto = auto;
	}
}
